package com.fare.taluo.util.Assert;

import com.fare.taluo.util.StringUtils;

public class Assert extends org.springframework.util.Assert {
	/**
	 * 必须全部都有值
	* @Description: TODO
	* @Title: hasAllText 
	* @return void
	 */
	public static void hasAllText(String message, String... str){
		if(str != null && str.length > 0){
			for(String s : str){
				Assert.hasText(s, message);
			}
		}
	}
	/**
	 * 只要有一个有值就可以了
	* @Title: hasOneText 
	* @return void
	 */
	public static void hasOneText(String message, String... str){
		boolean bl = false;
		if(str != null && str.length > 0){
			for(String s : str){
				bl = StringUtils.isNotEmpty(s);
				if(bl) break;
			}
		}
		if(!bl){
			throw new IllegalArgumentException(message);
		}
	}
	
	public static void notNull(Object object, String message){
		org.springframework.util.Assert.notNull(object, message);
	}
}
